#include "iostream"

class Base {
public:
    virtual ~Base() {}

    virtual void Print() const { std::cout << "Base" << "\n"; };
};

class Derived : public Base {
public:
    virtual void Print() { std::cout << "Derived" << "\n"; };
};

int main() {
    Base *base = new Derived();
    Derived *derived = new Derived();
    base->Print();
    derived->Print();
    delete base;
    delete derived;
    return 0;
}
